import Vue from 'vue'
import locale from 'element-ui/lib/locale'
import I18n from 'vue-i18n'
import messages from './langs'  //语言包
Vue.use(I18n)

const i18n = new I18n({
      locale:localStorage.getItem("lang") || 'zh', //语言标识
      messages   //语言包
   });
//实现element的多语言切换
locale.i18n((k,v)=>{
    i18n.t(k,v)
});

export default i18n;